package visitor.example;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author：LJ
 * @Description：
 * @Date: 2017/12/3
 * @Modified By:
 */
public class Client {
    public static void main(String[] args) {
        for (Employee e : mockEmployee()) {
            e.accept(new Visitor());
        }
    }

    public static List<Employee> mockEmployee() {
        List<Employee> list = new ArrayList<Employee>();
        CommonEmployee zhansan = new CommonEmployee();
        zhansan.setJod("编写Java程序,苦工加搬运工");
        zhansan.setName("张三");
        zhansan.setSalary(15000);
        zhansan.setSex(Employee.male);
        list.add(zhansan);
        CommonEmployee lisi = new CommonEmployee();
        lisi.setJod("编写C++程序,苦工加搬运工");
        lisi.setName("李斯");
        lisi.setSalary(16000);
        lisi.setSex(Employee.female);
        list.add(lisi);
        Manager jingli = new Manager();
        jingli.setPerformance("负责领导");
        jingli.setName("李斯");
        jingli.setSalary(26000);
        jingli.setSex(Employee.male);
        list.add(jingli);
        return list;
    }
}
